package com.zxt.manager;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zxt.dto.SysRoleQueryDTO;
import com.zxt.mapper.SysRoleMapper;
import com.zxt.model.SysRole;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 通用逻辑层-角色信息管理类
 *
 * @author zxt
 */
@Slf4j
@Service
public class SysRoleManager extends ServiceImpl<SysRoleMapper, SysRole> {


    public IPage<SysRole> query(SysRoleQueryDTO dto) {
        Page<SysRole> page = new Page<>(dto.getPageNo(), dto.getPageSize());
        LambdaQueryWrapper<SysRole> wrapper = SysRole.gw();
        return page(page, wrapper);
    }
}
